function DialogProduceNote(container, item, options) {
  this._container = container;
  this._item = item;
  this._options = options;
  
  this._createElements();
};

DialogProduceNote.prototype._createElements = function() {
  var gui, table, _self = this, unique = MiscUtils.unique();
  
  this._container.verticalAlign = 'top';
  
  table = document.createElement('table');
  table.style.width = '740px';
  table.cellPadding = 0;
  table.cellSpacing = 0;
  table.style.marginBottom = '-5px';
  this._container.appendChild(table);
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.fontWeight = 'bold';
  td.style.fontSize = '14px';
  td.style.height = '30px';
  td.style.color = '#694247';
  td.style.textAlign = 'center';
  td.appendChild(document.createTextNode('Note History'));
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  var itable = document.createElement('table');
  itable.style.width = '740px';
  itable.cellPadding = 0;
  itable.cellSpacing = 0;
  itable.style.borderTop = 'solid 1px #b4b4b4';
  itable.style.borderLeft = 'solid 1px #b4b4b4';
  itable.id = unique + '_mains_table';
  td.appendChild(itable);
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.style.borderRight = 'solid 1px #b4b4b4';
  itd.style.borderBottom = 'solid 1px #b4b4b4';
  itd.style.width = '100px';
  itd.style.fontWeight = 'bold';
  itd.style.fontSize = '12px';
  itd.style.height = '24px';
  itd.style.color = '#333';
  itd.style.textAlign = 'center';
  itd.style.backgroundColor = '#ddd';
  itd.appendChild(document.createTextNode('Date'));
  
  itd = itr.insertCell(-1);
  itd.style.borderRight = 'solid 1px #b4b4b4';
  itd.style.borderBottom = 'solid 1px #b4b4b4';
  itd.style.width = '110px';
  itd.style.color = '#333';
  itd.style.textAlign = 'left';
  itd.style.paddingLeft = '15px';
  itd.style.fontWeight = 'bold';
  itd.style.fontSize = '12px';
  itd.style.backgroundColor = '#ddd';
  itd.appendChild(document.createTextNode('User'));
  
  itd = itr.insertCell(-1);
  itd.style.borderRight = 'solid 1px #b4b4b4';
  itd.style.borderBottom = 'solid 1px #b4b4b4';
  itd.style.width = '480px';
  itd.style.paddingLeft = '15px';
  itd.style.textAlign = 'left';
  itd.style.fontWeight = 'bold';
  itd.style.fontSize = '12px';
  itd.style.color = '#333';
  itd.style.backgroundColor = '#ddd';
  itd.appendChild(document.createTextNode('Content'));
  
  itd = itr.insertCell(-1);
  itd.style.borderRight = 'solid 1px #b4b4b4';
  itd.style.borderBottom = 'solid 1px #b4b4b4';
  itd.style.width = '50px';
  itd.style.backgroundColor = '#ddd';
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.width = '740px';
  td.style.height = '10px';
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.height = '25px';
  td.style.width = '740px';
  td.style.fontWeight = 'bold';
  td.style.fontSize = '12px';
  td.style.verticalAlign = 'bottom';
  td.style.padding = '0 0 5px 0px';
  td.appendChild(document.createTextNode('New Note'));
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  input = document.createElement('textarea');
  input.style.borderRight= 'solid 1px #fff';
  input.style.borderBottom=  'solid 1px #fff';
  input.style.borderLeft= 'solid 1px #d2c4b9';
  input.style.borderTop= 'solid 1px #d2c4b9';
  input.id = unique + '_input_text';
  input.style.width = '736px';
  input.style.height = '100px';
  td.appendChild(input);
  
  tr = table.insertRow(-1);
  td = tr.insertCell(-1);
  td.style.height = '25px';
  td.style.verticalAlign = 'top';
  td.style.textAlign = 'right';
  var save = DOMUtils.createInput('', '', 'button', 'Add', null)
  save.id = unique + '_add_button';
  save.style.width = '68px';
  td.appendChild(save);
  var close = DOMUtils.createInput('', '', 'button', 'Close', null)
  close.id = unique + '_close_button';
  close.style.width = '68px';
  td.appendChild(close);
  
  gui = GuiDialogProduceNote.instance(unique, this._item);
  new HandleDialogProduceNote(gui, this._item, this._options);
};
  